feat(protos)!: remove deprecated IntervalDayToSecond.microseconds field#1116
Open
nielspardon wants to merge 1 commit into
Open
feat(protos)!: remove deprecated IntervalDayToSecond.microseconds field#1116nielspardon wants to merge 1 commit into
nielspardon wants to merge 1 commit into
Conversation
The microseconds field (field 3) of Expression.Literal.IntervalDayToSecond was deprecated in favor of the precision + subseconds fields, which cover and replace it. Remove it and reserve field number 3 (and the name) to prevent reuse. With microseconds gone, the precision_mode oneof has a single remaining member, so dissolve it and make precision a plain int32 field, matching how every other precision-bearing type (PrecisionTimestamp, PrecisionTimestampTZ, PrecisionTime, IntervalCompound) declares precision. This is wire compatible: precision keeps field number 4 and subseconds keeps field number 5, and oneof members are encoded identically to plain fields on the wire. An old plan that still carries microseconds (field 3) will be treated as an unknown field by consumers built against the new schema rather than failing to parse. Analyzed the four Substrait SDKs before removal: - go: reads microseconds only for backward compatibility; already writes precision/subseconds. Source-breaking (a couple of read branches to drop). - java: one backward-compat read fallback (ProtoExpressionConverter); already writes precision/subseconds. Source-breaking (one line to drop). - rust: no hand-written use; prost regenerates from the proto. No break. - python: no use of the deprecated field; already on precision/subseconds. No break. BREAKING CHANGE: removes deprecated Expression.Literal.IntervalDayToSecond.microseconds field. Producers must set precision + subseconds. Consumers can no longer interpret legacy plans that encoded sub-second values via microseconds without an explicit precision.
52573ab to
ff72aef
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the deprecated
microsecondsfield (field 3) fromExpression.Literal.IntervalDayToSecond. It was deprecated in #665 (first released in v0.54.0, 2024-08-11 — ~2 years ago) in favor ofprecision(field 4) +subseconds(field 5). Field number3and the namemicrosecondsare reserved to prevent reuse.With
microsecondsgone, theprecision_modeoneof has only one remaining member, so this PR dissolves the oneof and makesprecisiona plainint32, matching how every other precision-bearing type (PrecisionTimestamp,PrecisionTimestampTZ,PrecisionTime,IntervalCompound) declares precision.message IntervalDayToSecond { + reserved 3; // formerly the deprecated microseconds field, replaced by precision and subseconds + reserved "microseconds"; + int32 days = 1; int32 seconds = 2; - oneof precision_mode { - int32 microseconds = 3 [deprecated = true]; - int32 precision = 4; - } + int32 precision = 4; int64 subseconds = 5; }Wire compatibility
This is wire compatible:
precisionkeeps field number 4 andsubsecondskeeps field number 5.microseconds(field 3) is treated as an unknown field by consumers built against the new schema rather than failing to parse.It is source-breaking for generated bindings (removes the
microsecondsaccessor and theprecision_mode/PrecisionModeCasewrapper), and semantically breaking: consumers can no longer interpret legacy plans that encoded sub-second values viamicrosecondswithout an explicitprecision.SDK impact analysis
Analyzed all four SDKs before proposing removal:
microseconds?precision/subseconds?ProtoExpressionConverter)No SDK produces
microseconds; all are functionally onprecision/subseconds. The go and java changes are trivial companion cleanups on their read/backcompat paths.Notes
BREAKING CHANGE: removes deprecated
Expression.Literal.IntervalDayToSecond.microsecondsfield. Producers must setprecision+subseconds. Consumers can no longer interpret legacy plans that encoded sub-second values viamicrosecondswithout an explicitprecision.🤖 Generated with AI
This change is